package ml.uuku.oschub.util;

import android.annotation.TargetApi;
import android.content.Context;
import android.net.ConnectivityManager;
import android.os.Build;

import ml.uuku.oschub.base.BaseApplication;

@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public class TDevice {

    public TDevice() {
    }

    public static boolean hasInternet() {
        boolean flag;
        if (((ConnectivityManager) BaseApplication.context().getSystemService(Context.CONNECTIVITY_SERVICE))
                .getActiveNetworkInfo() != null)
            flag = true;
        else
            flag = false;
        return flag;
    }
}
